#include<bits/stdc++.h>
using namespace std;
int main()
{
	int a,b,c;
	cin>>a>>b>>c;
	if(a%b==0&&a%c==0)
	cout<<"1";
	else if(a%b==0||a%c==0)
	cout<<"2";
	else
	cout<<"3";
    return 0;
}
